package com.yzcrm.erp.psi.controller;

import com.jfinal.aop.Inject;
import com.jfinal.core.Controller;
import com.jfinal.core.paragetter.Para;
import com.yzcrm.common.config.paragetter.BasePageRequest;
import com.yzcrm.erp.crm.service.CrmBackLogService;
import com.yzcrm.erp.psi.service.PsiBackLogService;
import com.yzcrm.swagger.annotation.ActionApi;
import com.yzcrm.swagger.annotation.Api;
import com.yzcrm.swagger.annotation.Param;
import com.yzcrm.swagger.annotation.Params;

/**
 * @author jiang.xue
 */
@Api(remark = "进销存：待办事项")
public class PsiBackLogController extends Controller {

    @Inject
    PsiBackLogService psiBackLogService;

    /**
     * 出入库待办事项数量统计
     */
    @ActionApi(summary = "出入库待办事项数量统计", remark="出入库待办事项数量统计")
    public void num(){
        renderJson(psiBackLogService.num());
    }

    /**
     * 待审核出入库
     * @param basePageRequest
     */
    @ActionApi(summary = "待审核出入库", remark="待审核出入库")
    @Params({
            @Param(name="checkType", remark="1:待审核  2:已审核", dataType="int", defaultValue="", required=true),
            @Param(name="type", remark="模块 label 20销售退货salesEnter 21归还入库retrunEnter 22维修入库repairEnter 23内部测试入库testEnter 24盘盈inventoryProfitEnter 25其它入库otherEnter 30采购入库purchaseEnter  40销售出库salesLeave 41借用出库borrowLeave 42维修出库repairLeave 43内部测试出库testLeave 44盘亏出库 inventoryLossLeave 45其它出库otherLeave  ", dataType="int", defaultValue="", required=true)
    })
    public void checkEnterLeaveStock(BasePageRequest basePageRequest) {
        renderJson(psiBackLogService.checkEnterLeaveStock(basePageRequest));
    }

}
